/*
 * @Author: 137 '1432417996@qq.com'
 * @Date: 2025-03-24 21:45:15
 * @LastEditors: 137 '1432417996@qq.com'
 * @LastEditTime: 2025-05-20 03:43:20
 * @FilePath: \starter-3\api\activity.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import {request} from '@/api/request'

// 活动详情
export function getActivityDetail(activityId) {
    return request({
        url: `/activity/p/detail/${activityId}`,
        method: 'get',
    })
}

// 活动推荐
export function getActivityRecommend(params) {
    return request({
        url: `/activity/p/recommends`,
        method: 'get',
        params
    })
}

// 查询组织者列表
export function getActivityOrgs(activityId) {
    return request({
        url: `/activity/p/orgs/${activityId}`,
        method: 'get',
    })
}

// 活动列表
export function getActivityList(data) {
    return request({
        url: `/activity/p/list`,
        method: 'post',
        data
    })
}

// 活动标签
export function getActivityTags(data) {
    return request({
        url: `/activity/p/tags`,
        method: 'get',
        data
    })
}

// 活动标签
export function getActivityTops() {
    return request({
        url: `/activity/p/tops`,
        method: 'get',
    })
}



// 取消报名
export function getActivityCancel(params) {
    return request({
        url: `/activity/r/cancel`,
        method: 'post',
        params
    })
}

// 检查是否报名
export function getActivityCheckRegistered(params) {
    return request({
        url: `/activity/r/check-registered`,
        method: 'get',
        params
    })
}

// 报名结果
export function getActivityForMe(activityId) {
    return request({
        url: `/activity/r/my/${activityId}`,
        method: 'get',
    })
}


// 活动报名
export function getActivityRegistered(data) {
    return request({
        url: `/activity/r/register`,
        method: 'post',
        data
    })
}


